package com.example.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 本文来演示
 *
 * @author 赵建云
 * @create 2023/10/19
 */
public interface MessageMapper {
    @Select("select count(s_id) from message where s_id=#{value} and mes_identification = 0")
    int messageNumById(Integer sId);

    @Select("select pos_id from message where s_id = #{value} and mes_identification=0")
    List<Integer> messageById(Integer sId);

    @Insert("insert into message(s_id,r_id,pos_id) value(#{jsId},#{jrId},#{posId})")
    int insertMes(@Param("jsId") Integer jsId,@Param("jrId") Integer jrId,@Param("posId") Integer posId);

}
